import React from 'react';
import './header.css'
import {Link} from 'react-router-dom'
import {memus} from '../../../redux'
import {Redirect, Router,Route, Switch} from 'react-router-dom';


class MainHeader extends React.Component {
    constructor(props) {
        super(props);
        // 设置 initial state
        this.state = {};
    }

    render() {
        return (
            <div>
                {/*顶部栏*/}
                <div className="he_top">
                    <span>欢迎访问湖北省楚维法律咨询有限公司网站！</span>
                </div>
                {/*顶部文字栏*/}
                <div className={'header'}>
                    {/*logo*/}
                    <div className="cp he_top-logo" onClick={() => { this.$router.push("/")}}>
                        <img src="/images/logo.png" alt=""/>
                        <span>湖北省楚维法律咨询有限公司</span>
                    </div>
                    {/*文字头*/}
                    <div>
                        <ul className="header-texts">
                            {
                                memus.getState().filter(x=>x.level===1).map((x, i) => {
                                    return (<li key={i}><Link to={x.t_path}>{x.t_name}</Link></li>)
                                })
                            }

                        </ul>
                    </div>
                    <div className="iclco-phone">
                        <img src="/images/main_header_phone_logo.png" alt=""/>
                        <span>18171103955</span>
                    </div>
                </div>
            </div>
        );
    }
}

export default MainHeader;


